package proyecto.domain;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Enumerated;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.TypedQuery;
import javax.validation.constraints.NotNull;
import org.hibernate.annotations.NotFound;
import org.hibernate.mapping.Value;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(finders = { "findUsuariosByNombre", "findUsuariosByUsernameEquals" })
public class Usuario {

    @NotNull
    private String Nombre;

    @NotNull
    private String Apellido;

    @NotNull
    @Column(unique = true)
    private String username;

    @NotNull
    private String password;

    @ManyToOne
    private Rols role_name;

    private Boolean enabled;

    @ManyToOne
    private Sucursal nombre_sucursal;

    @ManyToOne
    private Area nombre_area;

    @ManyToOne
    private Provincia nombre_provincia;

    public static TypedQuery<proyecto.domain.Usuario> findUsuariosByNombre1(String usu) {
        return null;
    }
}
